<script type="text/javascript">
$(function(){
$('#customer-dg').edatagrid({
    url: 'Customer/customer_list',  
    saveUrl: 'Customer/customer_save',  
    updateUrl: 'Customer/customer_update',  
    destroyUrl: 'Customer/customer_destroy',
    fit: true,
    fitColumns: true,
    rownumbers: true,
    border: false,
    pagination: true,
    idField: 'id',
    pageSize: 10,
    pageList: [10, 20, 30, 40, 50],
    sortName: 'createdatetime',
    sortOrder: 'desc',
    checkOnSelect: false,
    selectOnCheck: false,
    nowrap: false,
    columns: [[{
        title: '姓名',
        field: 'name',
        width: 100,
        editor: 'text'
    },
    {
        title: '国家',
        field: 'country',
        width: 60,
        editor: 'text'
    },
    {
        title: '地址',
        field: 'address',
        width: 320,
        editor: 'text'
    },
    {
        title: '固定电话',
        field: 'tel',
        width: 100,
        editor: 'text'
    },
    {
        title: '电子邮箱',
        field: 'email',
        width: 80,
        editor: 'text'
    },
    {
        title: 'Skype',
        field: 'skype',
        width: 70,
        editor: 'text'
    },
    {
        title: 'MSN',
        field: 'msn',
        width: 60,
        editor: 'text'
    },
    {
        title: '阿里旺量',
        field: 'wangwang',
        width: 60,
        editor: 'text'
    },
    {
        field: 'date',
        title: '日期',
        width: 70,
        editor: 'text'
    }]],
    toolbar: '#customer-toolbar'
});
})
</script>
<table id="customer-dg">
</table>
<div id="customer-toolbar"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onClick="javascript:$('#customer-dg').edatagrid('addRow')">新增</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="javascript:$('#customer-dg').edatagrid('destroyRow')">删除 </a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#customer-dg').edatagrid('saveRow')">保存</a> <a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#customer-dg').edatagrid('cancelRow')">取消</a>  </div>